home *** CD-ROM | disk | FTP | other *** search
/ Mac-Source 1994 July / Mac-Source_July_1994.iso / C and C++ / Libraries / TurboTCP 1.0.1 / TurboTCP.source / Telnet.protocol.h < prev    next >
Text File  |  1993-11-02  |  3KB  |  95 lines

  1. /*
  2. ** Telnet.protocol.h
  3. **
  4. **    TurboTCP support library
  5. **    Constants for Telnet protocol interpreter
  6. **
  7. **    Copyright © 1993, FrostByte Design / Eric Scouten
  8. **
  9. */
  10.  
  11.  
  12. #pragma once
  13.  
  14.  
  15. // set to 1 to eliminate MacTCP & just test the terminal
  16.  
  17. #define _TestTerminal             0
  18.  
  19.  
  20. // Telnet standard keycodes
  21.  
  22. #ifndef _ASCII
  23. enum {                                    // standard Telnet/ASCII keycodes
  24.     charNUL = 0,
  25.     charBEL = 7,
  26.     charBS,
  27.     charHT,
  28.     charLF,
  29.     charVT,
  30.     charFF,
  31.     charCR,
  32.     charDEL = 127,
  33.     charIAC = 255                            // interpret as command
  34. };
  35. #define _ASCII 1
  36. #else
  37. #define charIAC 255
  38. #endif
  39.  
  40.  
  41.  
  42. // Telnet escape sequences — these characters have meaning only if preceded by IAC
  43.  
  44. enum {
  45.     escSE = 240,                            // end of subnegotiation
  46.     escNOP,                                // no-operation
  47.     escDM,                                // data mark (data stream portion of a Synch)
  48.     escBRK,                                // break key
  49.     escIP,                                // interrupt process
  50.     escAO,                                // abort output
  51.     escAYT,                                // are you there?
  52.     escEC,                                // erase character
  53.     escEL,                                // erase line
  54.     escGA,                                // go ahead
  55.     escSB,                                // begin subnegotiation
  56.     escWILL,
  57.     escWONT,
  58.     escDO,
  59.     escDONT,
  60.     escIAC                                // data byte 255
  61. };
  62.  
  63.  
  64. // Telnet option codes
  65.  
  66. enum {
  67.     optTRANSMIT_BINARY = 0,                // RFC 856: Telnet binary transmission
  68.     optECHO = 1,                            // RFC 857: Telnet echo option
  69.     optSUPPRESS_GO_AHEAD = 3,                // RFC 858: Telnet suppress go ahead option
  70.     optSTATUS = 5,                        // RFC 859: Telnet status option
  71.     optTIMING_MARK = 6,                    // RFC 860: Telnet timing mark option
  72.     optRCTE = 7,                            // RFC 726: Remote controlled transmssion and echoing telnet option
  73.     optLOGOUT = 18,                        // RFC 727: Telnet logout option
  74.     optBM = 19,                            // RFC 735: Revised Telnet byte macro option
  75.     optDET = 20,                            // RFC 732: Telnet data entry terminal option
  76.     optSUPDUP = 21,                        // RFC 736: Telnet SUPDUP option
  77.     optSUPDUP_OUTPUT = 22,                // RFC 749: Telnet SUPDUP output option
  78.     optSEND_LOCATION = 23,                    // RFC 779: Telnet send location option
  79.     optTERMINAL_TYPE = 24,                    // RFC 1091: Telnet terminal type option
  80.     optEND_OF_RECORD = 25,                    // RFC 885: Telnet end of record option
  81.     optTUID = 26,                            // RFC 927: TACACS user identification telnet option
  82.     optOUTMRK = 27,                        // RFC 933: Output marking Telnet option
  83.     optTTYLOC = 28,                        // RFC 946: Telnet terminal location number option
  84.     opt3270_REGIME = 29,                    // RFC 1041: Telnet 3270 regime option
  85.     optX_3_PAD = 30,                        // RFC 1053: Telnet X.3 pad option
  86.     optNAWS = 31,                            // RFC 1073: Telnet window size option
  87.     optTERMINAL_SPEED = 32,                // RFC 1079: Telnet terminal speed option
  88.     optTOGGLE_FLOW_CONTROL = 33,            // RFC 1372: Telnet remote flow control option
  89.     optLINEMODE = 34,                        // RFC 1184: Telnet linemode option
  90.     optX_DISPLAY_LOCATION = 35,            // RFC 1096: Telnet X display location option
  91.     optENVIRON = 36,                        // RFC 1408: Telnet environment option
  92.     optAUTHENTICATION = 37,                // RFC 1416: Telnet authentication option
  93.     optEXOPL = 255                        // RFC 861: Telnet extended options-list option
  94. };
  95.